/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* findThePrefixCommonArray(int* A, int ASize, int* B, int BSize, int* returnSize)
{
 int cur=0;
    int *ret=(int *)malloc(sizeof(int)*ASize);
    for (int i=0 ;i<ASize;++i)    //i控制前缀的长度
    {
        int cnt=0;  //重置计数
        for (int j=0;j<=i;++j)
        {
            for (int k=0;k<=i;++k)
            {
                if (A[j] == B[k])  //j、k互相遍历
                {
                    cnt++;
                }
            }
        }
        ret[cur++]=cnt;
    }
    *returnSize=ASize;
    return ret;
}